<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>条件渲染v-if</title>
</head>
<body>
    <div id="example-1">
        <p v-if="boolValue">{{message}}</p>
        <!--@click 是 v-on:click的缩写形式-->
        <button type="button" @click="changeValue()">click me!</button>
    </div>

<script src="../lib/vue.js"></script>
<script>
    var exampleVm = new Vue({
        el : "#example-1",
        data : {
            message : "hello vue.js",
            boolValue : false
        },
        methods : {
            changeValue : function () {
                this.boolValue = !this.boolValue;
            }
        }
    })
</script>
</body>
</html>